On Mon, Nov 16, 2015 at 4:17 AM, Vusa Moyo wrote:
> Hi Guys,
>
> My code is as follows
>
> # this list contains system process ID's
> pidst=[1232, 4543, 12009]
>
> pmap_str=[]
> command="pmap -d %s | grep private |awk '{print $1}' | awk -FK '{print $1}'"
>
> for i in range(len(pids)):
> pmap_s
Caroline,
The parentheses change the interpretation for the print statement. If you
put it without the parentheses, it will work fine.
print "Mashed ",veg," on the ceiling."
Also, another note: the spaces at end of the first string and the start of
the third string aren't necessary. When you use
Peter Otten wrote:
>> print("Mashed ",veg," on the ceiling.")
An unrelated note: Python automatically adds spaces between the printed
values, so the output of
print("Mashed", veg, "on the ceiling.")
will look better.
___
Tutor maillist - Tutor@py
caroline metcalf wrote:
> Hi there
>
> I am having an issue. This code normally works fine
>
> Code:
> veg="carrots"
> print("Mashed ",veg," on the ceiling.")
> print("Green beans on the floor.")
> print("Stewed tomatoes in the corner.")
> print("Squash upon the door.")
>
> But, I am getting t
On 17/11/15 12:27, caroline metcalf wrote:
veg="carrots"
print("Mashed ",veg," on the ceiling.")
print("Green beans on the floor.")
But, I am getting this. Result:
('Mashed ', 'carrots', ' on the ceiling.')
Green beans on the floor.
I have tried semi-colons instead of commas as Spain uses
Might you be using two single inverted commas '' rather than one inverted
comma "
Just a thought.
Also check the use of acute accents and inverted commas, they are easy to
mix up on a Spanish keyboard - depending on the font you use.
PY
On Tuesday, 17 November 2015, caroline metcalf <
caroline.m
Hi there
I am having an issue. This code normally works fine
Code:
veg="carrots"
print("Mashed ",veg," on the ceiling.")
print("Green beans on the floor.")
print("Stewed tomatoes in the corner.")
print("Squash upon the door.")
But, I am getting this. Result:
('Mashed ', 'carrots', ' on the cei
On Mon, Nov 16, 2015 at 12:48 PM, Alan Gauld
wrote:
>
>
> The correct fix is to exit() from the python3 shell and start it again.
>>
>
> He's tried that and didn't find it satisfactory. That's why
> he wants a "better" workflow.
>
> Alternatively, add some main code at the end of your file and use