0
how would I make something that says 'Hi' if you dont put / in front of it?
This is the only way I know: a = input() list(a) if a[0] != '/': print('Hi') its just not usable rlly
7 Answers
+ 1
a = input()
if a[0] != "/":
print("Hi")
+ 1
No need to change it to a list. The input is always a string, and strings can be seen as lists, where each letter is an element.
+ 1
Why do you need to convert to the list?
a = input()
if a != '/':
print('Hi')
else:
print(a)
0
i wouldn't have to change it to a list?
0
oh i see. thanks!
0
i would want people to put something directly after, like a command. "/" is different from "/cmd"
0
i don't want it to just be "/", is my point