Aug-21-2017, 11:03 AM
for quiz_num in range(2): print("The old way,don't use it' <%s>" % quiz_num) for quiz_num in range(2): print('A newer way format(),ten year old comes out with 2.6 <{}>'.format(quiz_num)) for quiz_num in range(2): print(f'The new way f-string 3.6 <{quiz_num}>')
Output:The old way,don't use it' <0>
The old way,don't use it' <1>
A newer way format(),ten year old comes out with 2.6 <0>
A newer way format(),ten year old comes out with 2.6 <1>
The new way f-string 3.6 <0>
The new way f-string 3.6 <1>