Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update description.ru.yml #207

Closed
wants to merge 2 commits into from
Closed

Conversation

sad-neil
Copy link

@sad-neil sad-neil commented May 4, 2022

def filter_string(text, char):
result = ''
for current_char in text:
if current_char.upper() != char.upper():
result += current_char
return result

text = 'If I look forward I am win'
filter_string(text, 'i') # ' '
print(filter_string(text, 'i')) # 'f look forward am wn'

def filter_string(text, char):
    result = ''
    for current_char in text:
        if current_char.upper() != char.upper():
            result += current_char
    return result

text = 'If I look forward I am win'
filter_string(text, 'i')  # ' '
print(filter_string(text, 'i'))  # 'f  look forward  am wn'
@ashikov
Copy link
Contributor

ashikov commented May 6, 2022

Для того чтобы показать, что вывод происходит на экран мы используем =>, как вот тут.

Поправьте, плиз, комментарии.

@ashikov ashikov self-requested a review May 6, 2022 05:07
@ashikov
Copy link
Contributor

ashikov commented May 18, 2022

@sad-neil тыц =)

filter_string(text, 'i') # 'f look forward wn'
filter_string(text, 'O') # 'If I lk frward I win'
filter_string(text, 'i') # => 'f look forward wn'
filter_string(text, 'O') # => 'If I lk frward I win'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вы добавили в комменатрий стрелочку, но это неверно.
# => используется для демонстрации того, что что-то выведится на экран. filter_string же не выводит на экран, она возвращает результат.

@zhabinka zhabinka closed this Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants