Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import sys
- line = sys.stdin.readline()
- headings = [" " for _ in line]
- col = 0
- word = False
- for (i, c) in enumerate(line):
- if not c.isspace():
- if word is False:
- headings[i] = str(col)
- col += 1
- word = True
- else:
- word = False
- print("".join(headings))
- print(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement