+ 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...

11th Dec 2022, 5:25 PM
Анна Перемолотова
Анна Перемолотова - avatar
3 Answers
+ 4
#format , not formate wrd = ["I ", "love ", "eggs"] x = " {0}{1}{2} ".format(wrd[0], wrd[1], wrd[2]) print(x)
11th Dec 2022, 5:28 PM
Jayakrishna 🇮🇳
+ 2
Omg, ahaha, thank you!!
11th Dec 2022, 5:30 PM
Анна Перемолотова
Анна Перемолотова - avatar
+ 1
The keyword format is spelt wrong if you remove 'e', then it will print
12th Dec 2022, 1:29 PM
Kishore Kumar