This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="navbar navbar-default navbar-fixed-top"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="#myPage">Mani Chabba</a> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = raw_input("Enter file:") | |
if len(name) < 1 : name = "mbox-short.txt" | |
handle = open(name) | |
hour = list() | |
count = dict() | |
for line in handle: | |
if not line.startswith("From ") : continue | |
time = line.split()[5] | |
hour.append(time.split(":")[0]) | |
for key in hour: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fname = input("Enter file name:") | |
handler = open(fname,'r') | |
file = handler.read() | |
words = file.split() | |
req = input("Enter the word you want to find in the file:") | |
ans = words.count(req) | |
print (req," occurs ",ans, " times.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = raw_input("Enter file:") | |
if len(name) < 1 : name = "mbox-short.txt" | |
handle = open(name) | |
emails = list() | |
count = dict() | |
for line in handle: | |
if not line.startswith("From ") : continue | |
words = line.split() | |
emails.append (words[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fname = raw_input("Enter file name: ") | |
fh = open(fname) | |
lst = list() | |
for line in fh: | |
for word in line.split(): | |
if word not in lst: | |
lst.append(word) | |
lst.sort() | |
print lst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spam = 0.0 | |
Count = 0 | |
fname = raw_input("Enter file name: ") | |
try: | |
fh = open(fname) | |
except: | |
print "File cannot be opened:",fname | |
exit () | |
for line in fh: |
NewerOlder