Let me see if I can help =)
Open the editor, save the file as filename.py
open the regular terminal, not the python "terminal" and type:
python filename.py
The stickies for the forum. ...
Type: Posts; User: cardboardtoast; Keyword(s):
Let me see if I can help =)
Open the editor, save the file as filename.py
open the regular terminal, not the python "terminal" and type:
python filename.py
The stickies for the forum. ...
I think Darth would win cause 1 reason--The force can move objects right (as seen in like all the movies)? What is stopping darth from just flipping kirks teams weapons in their hands and mentally...
ah, I had the .join in the wrong place...
THanks, that got it!:popcorn:
Ok, heres the input file:
if I say morningtide-goblin_3, it should output with the goblin's 5 getting +3:
and if I add a completely new one ie- new-creature_3:
It should put out:
for line in fileinput.input('mtgcollection.txt',inplace=1):
if not newcardlist.split('_')[0] in line.split('_')[0]:
print line.rsplit()
fileinput.close()
why is this always printing...
damoxc: Unfortunatly, that seems to have the same problem as I am having:
when I go look in the file, I see this:
line1here
line2here
line3here
newline2here
leaving the old line 2 in the...
Hi,
I have been trying to figure out how to remove lines in a text file, but can't figure out how...
ie- if I have this:
line1here
line2here
line3here
Thanks for the explanation. So, a "structured" programing language is linear? (I think that is what is being said) What makes OOP non-linear? Sorry, but I don't know much about either..:(
hope...
ah, thanks!
Here's mine:
#!/usr/bin/env python
import random
Tries = 0
myGuess = -1
Randomnum = random.choice(range(1,101))
What exactly ARE the rules??? I read the "structured programming" link, but that left me confused...:( Do we just make a number guessing program, or do we have to do it a special way?
mosty...
Umm...I'm a spy?:rolleyes: Nope, just was tired and in a rush...fixed
Some of us didn't even know what urllib was before we did this(or that it was a "cop-out"), and stop making me look...
I believe he/she said that his/her site(the test site) is valid xhtml
My try:
Python
#!/usr/bin/env python
#challenge 4
import urllib2
t = 0
while t == 0:
Well, here's my try (hope it works right)...:) still learning
Python!
#!/usr/bin/env python
#challenge 3
#read and write files:
readfile = open("bhaarat.text", "r+")