-1

I have a userProfile text file in which the first line contains the username and password of said user. How do I print all the contents of the userProfile file except for the login details?(very first line in file.) I know how to print all of it, but how do i 'subtract' the first line?

Gote
  • 33
  • 3

1 Answers1

-1

Read your file and ignore first line with [1:]

userlist = open(f'test.txt').readlines()[1:]
for user in userlist:
    print(user)
ikibir
  • 376
  • 3
  • 11