Open this example in the interactive library
Source code
print('user:ada'.removeprefix('user:'))Sample output
ada

Remove an exact prefix. A self-contained example using the Python standard library.
Open this example in the interactive library
print('user:ada'.removeprefix('user:'))ada