format replace

En la celda después de explicar format, pone que se sustituye [] cuando debería ser {}
pull/3/head
jgdiaz 5 years ago committed by GitHub
parent 8913c5ecde
commit d857869c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -291,7 +291,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"import math\n", "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 #{}#'.format(math.pi))\n",
"print('PI #{:5.2f}#'.format(math.pi)) # at least 5 characters with two decimals" "print('PI #{:5.2f}#'.format(math.pi)) # at least 5 characters with two decimals"
] ]

Loading…
Cancel
Save