Advertisement
TristanSld

türkçe harf denetleme dizelgesi

Jan 8th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #-*-coding:utf-8-*-
  3. a=1
  4. while a==1:
  5.     turkce_harfler="ışğçüöİŞĞÇÜÖ"
  6.     denetleme_dizelgesi=[]
  7.     dosya=raw_input("Dosya için bir ad seçin: ")
  8.     for hrf in dosya:
  9.         if hrf in turkce_harfler:
  10.             denetleme_dizelgesi.append(hrf)
  11.     if denetleme_dizelgesi:
  12.         print "Dosya adında Türkçe harf olmamalı!"
  13.         a=1
  14.     elif len(dosya)>8:
  15.         print "Dosya adı en fazla 8 karakter içerebilir!"
  16.         a=1
  17.     else:
  18.         print 'Dosya "%s" adıyla kaydedildi!'%dosya
  19.         quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement