I’m having a problem. I need to create the @everyone_or_person feature. A bit like discord. But I’ll have to be able to read the word after the @ and stop reading when there is a ("SPACE"/"_") and check for that word in the list. I’ve appended a simple version as an example. I knew it would not work but I couldn’t think of anything else.
input = input("input: ") value = input.find("@") output = input.partition("@") print(str(output))
I’ve tried to look up how to do it but to no avail.
test = "Some input with @your_desired_value in it" result = test.split("@").split(" ") print(result)
this splits your text at the @, takes the entire string after the @, splits again at the first space, and takes the string before that.