SHARE
TWEET

Untitled

a guest May 12th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ...
  2. searching_for = 'abc'
  3.  
  4. found = False
  5.  
  6. with open('/etc/passwd') as f:
  7.     for line in f:
  8.         username = line.split(':')[1]
  9.         if username == searching_for:
  10.             found = True
  11.             break
  12.  
  13.         if found == 'True'
  14.                 print('found')
  15.         else:
  16.                 print('not found')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top