python string pop code example
Example 1: python string pop
// no pop methode for strings (strings are immutable)
a = "abc"
last_letter = a[-1]
a = a[:-1]
Example 2: pop list python
#pop removes the last element
li=[1,2,3,4,5]
li.pop()
#>>>[1, 2, 3, 4]