Re: Best first programming language

Etusivu
Liitteet:
Viesti alkuperäisessä muodossaan
+ (text/plain)
Poista viesti
Vastaa
Lähettäjä: Jon M. Hanson
Päiväys:  
Vastaanottaja: Main PLUG discussion list
Uudet otsikot: Best "professional" "WEB site" tool out there...
Aihe: Re: Best first programming language
The Python print function automatically appends a newline at the end
of the string you tell it to print (this can be overridden).
---
Jon M. Hanson (N7ZVJ)
Homepage: http://the-hansons-az.net/drupal
Jabber IM:




On May 19, 2009, at 7:29 AM, Jerry Davis wrote:

> BTW, can someone tell me why this happens?
>
> $ perl -e 'print "hello world\n"'
> hello world
>
> $ python -c 'print "hello world"'
> hello world
>
> notice that I DID NOT have to put the \n at then end of the python
> print
> statement? is it something to do with the -c (i.e. smart enough to
> know it is a
> cmd line script, and automatically puts a \n at the end?) or
> something?
>
> notice what happens when you leave the \n off of the perl script,
> and add a \n
> to the python script.
>
> just curious.
>
> --
> Hobbit Name: Pimpernel Loamsdown
> Registered Linux User: 275424
> K7AZJ
>
> This email's Fortune:
> The only way to amuse some people is to slip and fall on an
> icy pavement.
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss