Presently I am doing this
print 'Enter source'
source = tuple(sys.stdin.readline())
print 'Enter target'
target = tuple(sys.stdin.readline())
but source and target become string tuples in this case with a \n at the end
Presently I am doing this
print 'Enter source'
source = tuple(sys.stdin.readline())
print 'Enter target'
target = tuple(sys.stdin.readline())
but source and target become string tuples in this case with a \n at the end
tuple(int(x.strip()) for x in raw_input().split(','))
sys.stdin.readline() does have the advantage of working across python2 and python3. In python3 raw_input is renamed to inputIf you still want the user to be prompted twice etc.
print 'Enter source'
source = sys.stdin.readline().strip() #strip removes the \n
print 'Enter target'
target = sys.stdin.readline().strip()
myTuple = tuple([int(source), int(target)])
This is probably less pythonic, but more didactic...