S
S
s4q2020-06-20 01:33:38
Python
s4q, 2020-06-20 01:33:38

How to remove all hyphens in a variable?

There is a variable lss, declared like this: The output is: 4 4 4 How to change the variable so that 444 is displayed?
lss = '4\n4\n4'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2020-06-20
@s4q

print(lss.replace('\n', ''))
444

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question