To take multiple variables as input in a single line, we can use split() function as :
totalCities, totalPath = raw_input().split()
To take a integer variable as input, we can use int() function as :
T = int(raw_input())
When we take a variable as input using raw_input() function, python stores it as a string, so if we would like to take multiple variables as integer as input, we would have to take input as string, then convert them into integers as :
N,K = raw_input().split() N = int(N) K = int(K)
This can be done in a single line as well using map() function as :
N,K = map(int,raw_input().split())