Python drugi cas

U ovom tekstu cu da obradim escape karakter \n.

Primer 1:

\n je takozvani escape karakter, koji u sustini predstavlja prelazak u novi red. U ovom primeru sam upisao dva puta \n da bih prvo ubacio dva prazna reda, a zatim se ispise tekst.

#! /usr/bin/python3

print ("\n\nZdravo ja sam Python!")

Primer 2:

\n mozete ubacivati gde god zelite u stringu i koliko god puta hocete.

#! /usr/bin/python3

print ("Z\nd\nr\na\nv\no\n \nj\na\n \ns\na\nm\n \nP\ny\nt\nh\no\nn\n!")

About darthewok

Kompjuterski entuzijasta sa preko 30 godina iskustva.

Posted on 2014/01/04, in Programski jezici, Python and tagged , . Bookmark the permalink. 1 Comment.

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

%d bloggers like this: