The Mother Board
Python Syntax

 
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Dr.Robotnik
Pilgrim
Pilgrim


Joined: 13 Jun 2010
Posts: 13

PostPosted: Tue Dec 07, 2010 8:49 am    Post subject: Python Syntax Reply with quote

I'm new to python and I have a simple syntax question. It is so simple I don't even know what to type into google. Here is what I'm trying to do in c++...

Code:
char array[] = "hello";

array[3] = 'z';


how would I do this in python?

I tried this

Code:
string = "hello"

string[3] = 'z'


but it doesn't work.

also i'm using python24
Back to top
View user's profile Send private message
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36700
Location: Netherlands, Breda

PostPosted: Thu Dec 09, 2010 5:09 am    Post subject: Reply with quote

assumed version: 2.4

http://docs.python.org/release/2.4/tut/tut.html
_________________
We hate rut, but we fear change.



System error, strike any user to continue...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Dr.Robotnik
Pilgrim
Pilgrim


Joined: 13 Jun 2010
Posts: 13

PostPosted: Thu Dec 09, 2010 9:17 am    Post subject: Reply with quote

Thanks a lot.

That is so weird, you have to create a new string. I don't like python24, i am taking a programming course half in python half in java, I can't wait to get to java... At least now i can make the library work off a flash drive though.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group