mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-24 23:42:29 +00:00
format replace
En la celda después de explicar format, pone que se sustituye [] cuando debería ser {}
This commit is contained in:
parent
8913c5ecde
commit
d857869c06
@ -291,7 +291,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import math\n",
|
||||
"print('Number: {},{}'.format(1, 2)) #replaces [] inside the string by the arguments of format\n",
|
||||
"print('Number: {},{}'.format(1, 2)) #replaces {} inside the string by the arguments of format\n",
|
||||
"print('PI #{}#'.format(math.pi))\n",
|
||||
"print('PI #{:5.2f}#'.format(math.pi)) # at least 5 characters with two decimals"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user