Answer the question
In order to leave comments, you need to log in
How to remove specific text from a variable in python?
Hello I
have a code:
#есть текст
text = ("hello world")
#как мне сделать чтобы из этого текста удалилось слово hello?
print(text)
Answer the question
In order to leave comments, you need to log in
text = "hello world"
text = text.replace('hello', '') #1параметр слово для заменя, втрой слово кторым заменьтяся
print(text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question