+ 1
Hi, guys. Can you help me with code?
Here it is: wrd = ["I ", "love ", "eggs"] x = " {0}{1}{2} ".formate(wrd[0], wrd[1], wrd[2]) print(x) Code shows error in line2, attitudeerror. But I can't find where is the problem...
3 Answers
+ 4
#format , not formate
wrd = ["I ", "love ", "eggs"]
x = " {0}{1}{2} ".format(wrd[0], wrd[1], wrd[2])
print(x)
+ 2
Omg, ahaha, thank you!!
+ 1
The keyword format is spelt wrong if you remove 'e', then it will print