Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('input.txt', 'r') as file:
- text = file.readlines()
- if 'n' in text[0] and len(text[0]) > 3:
- num = int(text[0].split()[1])
- else:
- num = int(10)
- if len(text) < num:
- num = len(text) - 1
- for i in range(num):
- print(text[len(text) - num + i], end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement