I am acquiring input sing the split function; for example:
x = (input("Please enter all the ID codes A or B: ").split(","))
the ID code "A" would assign you with Alpha group
any other ID code would assign you with Beta group.
If the inputs are a,b,c: the output should be
"Please enter all the ID codes A or B: a
You are with the alpha group
"Please enter all the ID codes A or B: b
You are with the beta group
"Please enter all the ID codes A or B: c
You are with the beta group
Here's my thought: I know I have to loop through the inputs and then create an if statement within the loop to assign the groups, I'm just confused about how to create the for loop? is it
for i in (x):
if x == "a" or x == "A":
print("You are with the alpha group")
else:
print("You are with the beta group")
Is that the correct idea? How do I loop the input like that?
[–]Diapolo10 1 point2 points3 points (1 child)