Skip to content

Commit 57261d5

Browse files
committed
Prefer .format over % formatting
1 parent 2afd733 commit 57261d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

programming/python/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ The same function modified & printing a log message:
3333

3434
~~~~~ python
3535
def square(num):
36-
print 'found the square of %d' % num
36+
print "found the square of {:d}".format(num)
3737
return num * num
3838
~~~~~

0 commit comments

Comments
 (0)