Merge pull request #3 from jgdiaz/patch-1

format cell, replace character in string
dveni-patch-1
J. Fernando Sánchez 5 years ago committed by GitHub
commit a1abd4b766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -263,7 +263,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