Trying to create a program to find specific characters in a string Please point out the error
s=input('sentence:') w=input ('Find words:') for i in s: if i==w: print (i+'found at position') else: print (w+'No Characters')
for i in s:
In this loop, i takes out one character, one character from s. If w is more than two characters, the ifi==w: condition will never be satisfied.
i
s
w
ifi==w:
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
578 Understanding How to Configure Google API Key
582 PHP ssh2_scp_send fails to send files as intended
881 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
© 2024 OneMinuteCode. All rights reserved.