Hi friends. Where am I wrong? Output must be: Day 1, 8 pulls ups | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi friends. Where am I wrong? Output must be: Day 1, 8 pulls ups

file = open("/usercode/files/pull_ups.txt") n = int(input()) print (file.readlines()) file.close()

18th May 2021, 6:02 AM
Hemmily Beatriz Castillo Arrieta
Hemmily Beatriz Castillo Arrieta - avatar
2 Answers
0
.readlines() returns all the lines of text in a file as a list. Try indexing after that
18th May 2021, 7:15 AM
Slick
Slick - avatar
0
How is that? 😳
18th May 2021, 4:33 PM
Hemmily Beatriz Castillo Arrieta
Hemmily Beatriz Castillo Arrieta - avatar