LearnPy Hub
← File Handling problems
Medium

Jump Around With seek()

Write the input line to s.txt. Read k. Open the file, seek(k) and print what read() returns from there, then print f.tell().

Input

A line, then k.

Output

Two lines.

Sample 1

Input
Hello World
6
Output
World
11

Sample 2

Input
Python
0
Output
Python
6
solution.py
Output appears here
Jump Around With seek() · Python practice problem · LearnPy Hub