Separating alphabets and numbers from Python strings

Asked 2 years ago, Updated 2 years ago, 19 views

1

python

2022-09-21 15:39

1 Answers

Question is not specific

"Currently, we are trying to increase the number value by +1 by separating the alphabets and numbers in the 'G5133' and 'H5133' parts of the code below." How can we do that?"

Write down only simple answers to

v1 = 'G5133'
print(v1[0])
print(int(v1[1:]) + 1)

G
5134


2022-09-21 15:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.