The following code takes a string such as abcd#1234, removes the '#' and splits it into abcd and 1234
import sys
import re
print("User ID: {0}").format(sys.argv[1])
print("User Type: {0}").format(sys.argv[2])
sub = re.sub('[#]', '', sys.argv[1])
split = re.match(r"([a-z]+)([0-9]+)", sub, re.I)
print(split.groups())
The output from print(split.groups()) is
<'abcd', '1234'>
How can I take an individual section of the split such as abcd and just output that?
print(split.groups()[0])?