No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
I have two arrays: n = [30, 47.2, 70.2, 77.4, 36.3, 20.6, 18.1, 21.4, 22, 25.4, 27.1, 40.3, 57, 76.6, 52.3, 19.5, 11.2, 7.6, 14.6, 16.2, 24.7] p = [4, 6.1, 9.8, 35.2, 59.4, 41.7, 19, 13, 8.3, 9.1, 7.4, 8, 12.3, 19.5, 45.7, 51.1, 29.7, 15.8, 9.7, 10.1, 8.6] … | |
I want to call 'n' which is the input number followed by a string. I've been putting it like this: (n 'string') but it is wrong. How do I write it? | |
I want to know how many partitions are in my system and I used fdisk (found the command on google). The following came out, and I'm not too sure where it says how many partitions. # fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't … | |
I am using Fedora Linux on VMware. When I start it up, it doesn't ask for username or password. I tried doing useradd on the terminal and it says I don't have permission. Is it because I didn't install it right, or I have to do something else? Or is … | |
Please tell me what I'm doing wrong. I have a list, and I want python to make a file out of it. [CODE]def changename(filename, modifier): return filename[:4]+modifier+filename[-4:][/CODE] [CODE]def fileWrite(filename, ext, sortedList): openthis =open(okfilename(changename(filename,'_'+ext)),'wb') for item in sortedList: openthis.write(item) openthis.write('\n') return[/CODE] [CODE]lastnames.append(newNames) lastnames.sort() print '\n'.join(lastnames) names.close() fileWrite(filename, "Last-sorted", lastnames)[/CODE] | |
So I need to write a function that if a file exists, it will change the file name by sequentially adding integers, starting with 1, to the base file name (the part that does not include the file extension). so if the filename is hello.dat, then it will return hello1.dat … |
The End.