6 questions
fname = input('Enter fline name: ')if len(fname) < 1 : fname = 'mbox-short.txt'fh = open(fname)count = 0for line in fh : if 'From ' in line : mail = line.split() print(mail[1]) count = count + 1...
name = input ('Enter file name: ')if len(name) > 1 : name = 'mbox-short.txt'filename = open(name)for line in filename : if 'From ' in line : print(line.rstrip) else : continueprint(filename)(1)I'...
I wonder why David921 read from the file through the strlen function has a length of 9.When reading the same David921 length through gets, the length is 8 so I wonder why this difference occurs.
How do I figure out how many elements can fit in an array?It's not how many values I've allocatedI'd like to know how many can fit.
for (int i = 0; i < strlen(ss); ++i){ // Hello}If you think about it, the ss might change inside the for statementI think strlen(ss) should be calculated every timeBut if you do strlen() every time...
I'm coding to get the value I want from Python.First of all, I specified a value for c and r and appended it to shot_listAnd we used print(len(set(shot_list))) to see the largest number here There are...
© 2024 OneMinuteCode. All rights reserved.