LearnPy Hub
← File Handling problems
Medium

File Size in Bytes

Read a line and write it to t.txt using UTF-8 encoding. Print the number of characters, then the file size in bytes with os.path.getsize (non-English letters take more than one byte).

Input

One line.

Output

Two lines.

Sample 1

Input
hello
Output
5
5

Sample 2

Input
বাংলা
Output
5
15
solution.py
Output appears here
File Size in Bytes · Python practice problem · LearnPy Hub