Removing first x characters from string?

前端 未结 5 739
轻奢々
轻奢々 2020-12-23 02:36

How might one remove the first x characters from a string? For example, if one had a string lipsum, how would they remove the first 3 characters and get a resul

5条回答
  •  长情又很酷
    2020-12-23 03:18

    Example to show last 3 digits of account number.

    x = '1234567890'   
    x.replace(x[:7], '')
    
    o/p: '890'
    

提交回复
热议问题