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:
549 PHP ssh2_scp_send fails to send files as intended
642 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
537 Uncaught (inpromise) Error on Electron: An object could not be cloned
557 Scrap text information after the "View More" button when searching in the Yahoo! News search window
548 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.