Hey,
To split a string you can use split method, which splits a string into a list. You can specify the separator as show below in the syntax:
For eg,
txt= "ABC:ashjgfja"
x=txt.split(":")
print(x)
This will print your string ABC but will discard the string after the separator you have provided.
Try this, if it helps then let me know and if you face any problem then do share it here.