I need to print this list without the commas, but I can't seem to figure out how.
data = (
('Sabrina Bryan,1/3/98,ss9387,f9;s1;m1,99km'),
('Fergus Connon Archer,11/21/89,ss5246,f1;s3,102km'),
('Adrian Harvey,3/3/78,ss1654,m5;s2,72km'),
('Patricia Abigail Wolf,9/5/00,ss0936,f3;s4;m8,134km'),
('Georgina Kramer,6/15/95,ss4837,f5;s2;m1,55km'),
('Glenn Julian Ayala,3/19/90,ss3689,s4;f3,152km'),
('Anita Davila,6/27/91,ss9367,f8,203km'),
('Gertrude Nunez,1/12/97,ss3948,s3;m1,34km'),
('Solomon Burton,8/5/88,ss7364,s2;f1,23km'),
('Rafael John Murray,10/19/01,ss9105,s9;f3,78km')
)
info = input("What would you like to do? ")
if info == 'b':
for line in data:
fname0 = data[0].split(' ')
lname0 = fname0[1].split(',')
bday0 = lname0[1].split('/')
def Sabrina(fname0, bday0):
print(fname0[0], *bday0[0:2], sep = ', ')
print(Sabrina(fname0, bday0))
It is printing "Sabrina, 1, 3" when I want it to print "Sabrina 1 3". I have tried using the .replace
command, *bday0[0:2].replace(',', ' ')
, but it just gives me an error. Any tips?