Get First N Characters of String using Python July 8, 2021 Python 0 Comments 274 Views Slicing text = 'HelloWorld!' n = 5 result = text[:n] print(result) # Hello
Leave a Comment
Cancel reply