The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Tue Oct 16, 2018 2:24 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Python Syntax
PostPosted: Tue Dec 07, 2010 8:49 am 
Offline
Pilgrim
Pilgrim

Joined: Sun Jun 13, 2010 8:10 pm
Posts: 13
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 09, 2010 5:09 am 
Offline
Mobo-fu Master
Mobo-fu Master

Joined: Sun May 06, 2001 12:01 am
Posts: 37464
Location: Netherlands
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...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 09, 2010 9:17 am 
Offline
Pilgrim
Pilgrim

Joined: Sun Jun 13, 2010 8:10 pm
Posts: 13
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group