File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 66for i in [1 , 2 , 3 , 4 ]:
77 print (i )
88 sum += i
9- print ("sum = " + str ( sum ) )
9+ print ("sum = " , sum )
1010assert sum == 10
1111
1212alphabets : str = ""
1313c : str
1414for c in "abcde" :
1515 print (c )
1616 alphabets += c
17- print ("alphabets = " + alphabets )
17+ print ("alphabets = " , alphabets )
1818assert alphabets == "abcde"
1919
2020alphabets = ""
2121s : str = "abcde"
2222for c in s [1 :4 ]:
23+ print (c )
2324 alphabets += c
24- print ("alphabets = " + alphabets )
25+ print ("alphabets = " , alphabets )
2526assert alphabets == "bcd"
2627
2728sum = 0
2829num_list : list [i32 ] = [1 , 2 , 3 , 4 ]
2930for i in num_list [1 :3 ]:
3031 print (i )
3132 sum += i
32- print ("sum = " + str ( sum ) )
33+ print ("sum = " , sum )
3334assert sum == 5
3435
3536sum = 0
3637nested_list : list [list [i32 ]] = [[1 , 2 , 3 , 4 ]]
3738for i in nested_list [0 ]:
3839 print (i )
3940 sum += i
40- print ("sum = " + str ( sum ) )
41+ print ("sum = " , sum )
4142assert sum == 10
You can’t perform that action at this time.
0 commit comments