break a time, with break the c0de…

how to reverse string in python ?


how to reverse string in python ?
simple…

#!/usr/bin/python
string = "xirtam"
reverse_string = string[::-1]
print reverse_string

Belajar Membuat Website dengan Adobe Dreamweaver

>> matrix
Advertisements

2 responses

  1. Thanks for this small Python code, I will save it for future reference.

    February 10, 2010 at 1:38 pm

    • you’re welcome bro, i will add more code python code here… :)

      February 10, 2010 at 10:10 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s