lixiang


  • Home

  • About

  • Tags

  • Categories

  • Archives

Calculate the Number of Uppercase Letters in a File

Posted on 2018-11-27 | Visitors:
1
2
3
4
5
6
7
8
9
import os
os.chdir("C:\\users\\lixiang\\desktop")

with open("file.txt") as file:
count = 0
for i in file.read():
if i.isupper():
count += 1
print(count)
Callatz Conjecture(3n+1 Conjecture) in Matlab
Shuffle a List in Place
li xiang

li xiang

43 posts
6 categories
5 tags
GitHub Twitter Telegram
© 2022 li xiang  京ICP备18019569号
Powered by Hexo
|
Theme — NexT.Mist v5.1.4