This is a standard input memo that is often used for Python 3 competition pros.
I've put them together in one code with comments so you don't get lost when referencing.
'''
Summary of how to receive standard input
'''
#___If you want the strings and numbers as they are___#
#Character string line by line
s = input()
#2 strings per line
s, t = input().split()
#Integer line by line
s = int(input())
#Integer 1 line 2
n, m = map(int, input().split())
#___If you want a list___#
#List string 1 line
a = input().split()
#List integer 1 line
a = list(map(int, input().split()))
#List string n is the specified line
a = [input() for i in range(n)]
#List Integer n is the specified row
a = [int(input()) for i in range(n)]
#___If you want a two-dimensional array___#
#Two-dimensional array Character string n is specified line Multiple matrices separated by spaces
a = [input().split() for l in range(n)]