Python Tutorial.

2008-01-17 Thread Rizwan

Hiya,

I found one good website for python tutorial. just thought to share
with community.

Hope you all also like it..

 http://python.objectis.net


-MR

-- 
http://mail.python.org/mailman/listinfo/python-list


how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
for each word in each line how can we check to see if a word is already present 
in a list and if it is not how to append that word to a new list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
Thank you

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick  wrote:
> On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan
> <> wrote:
> >
> > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS.
> >
> >
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> 
> That isn't a productive way to get assistance.   It is true that
> people here are often very knowledgeable to help with python problems,
> but as a rule,  doing someone's homework isn't something people like
> to do.
> 
> On to your problem.  You should understand lists and sets, and for
> loops.  Try some code and come back with what you have.  Then you will
> get help to go further
> 
> -- 
> Joel Goldstick
> http://joelgoldstick.com/blog
> http://cc-baseballstats.info/stats/birthdays

I have been trying since morning but it doesn't work.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 10:59:46 UTC-5, Alister  wrote:
> On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote:
> 
> > for each word in each line how can we check to see if a word is already
> > present in a list and if it is not how to append that word to a new list
> 
> the 1st step is to stay awake in class & listen to your instructor, then 
> try to apply the principle involved
> 
> We don't do homework for you
> 
> when you have produced a program of you own (not necessarily working) if 
> you post it here then we will be more than happy to provide constructive 
> criticism
> 
> 
> 
> 
> -- 
> "Show business is just like high school, except you get paid."
> - Martin Mull

IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 12:14:37 UTC-5, Joel Goldstick  wrote:
> On Sun, Nov 25, 2018 at 11:51 AM Muhammad Rizwan
> <> wrote:
> >
> > On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick  wrote:
> > > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan
> > > <> wrote:
> > > >
> > > > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART 
> > > > ASS.
> > > >
> > > >
> > > > --
> > > > https://mail.python.org/mailman/listinfo/python-list
> > >
> > > That isn't a productive way to get assistance.   It is true that
> > > people here are often very knowledgeable to help with python problems,
> > > but as a rule,  doing someone's homework isn't something people like
> > > to do.
> > >
> > > On to your problem.  You should understand lists and sets, and for
> > > loops.  Try some code and come back with what you have.  Then you will
> > > get help to go further
> > >
> > > --
> > > Joel Goldstick
> > > http://joelgoldstick.com/blog
> > > http://cc-baseballstats.info/stats/birthdays
> >
> > I have been trying since morning but it doesn't work.
> 
> The way to use this mailing list is to explain your problem, which you
> have done.  Then, show the code you have written with the results it
> produces.  Its good to include the operating system you are using
> (windows, linux, osx), and if your code produces a traceback, copy and
> paste it here.
> 
> Its common to be frustrated learning to write and writing code, but if
> you want help you have to show something for others to help you with
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> -- 
> Joel Goldstick
> http://joelgoldstick.com/blog
> http://cc-baseballstats.info/stats/birthdays

Below is my approach which I am sure is wrong somewhere and it doesn't work the 
way expected, the append doesn't do anything in my code nor does it returns any 
traceback all i see is a empty list printed at the end, I am using win10 x64 
python 3.x atom-editor. Please take a look if you can tell me what am I doing 
wrong here. I want to check each list word by word if the word is not repeated 
in the same list it should be appended to a 'newlist'. Thanks in advance

handle = open('file.txt')
newlist = list()
for line in handle:
#line.rstrip()
linewords = line.split()
print(linewords)

for word in linewords:
newlist.append(word)
if word not in linewords:
continue



print('new: ',newlist)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 13:48:42 UTC-5, Alister  wrote:
> On Sun, 25 Nov 2018 08:49:03 -0800, Muhammad Rizwan wrote:
> 
> > On Sunday, 25 November 2018 10:59:46 UTC-5, Alister  wrote:
> >> On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote:
> >> 
> >> > for each word in each line how can we check to see if a word is
> >> > already present in a list and if it is not how to append that word to
> >> > a new list
> >> 
> >> the 1st step is to stay awake in class & listen to your instructor,
> >> then try to apply the principle involved
> >> 
> >> We don't do homework for you
> >> 
> >> when you have produced a program of you own (not necessarily working)
> >> if you post it here then we will be more than happy to provide
> >> constructive criticism
> >> 
> >> 
> >> 
> >> 
> >> --
> >> "Show business is just like high school, except you get paid."
> >> - Martin Mull
> > 
> > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART
> > ASS.
> 
> with an attitude like that I will go one better & ignore ALL your posts
> 
> 
> 
> -- 
> Good news.  Ten weeks from Friday will be a pretty good day.

Yes please ignore. Don't need any help from you either. 
-- 
https://mail.python.org/mailman/listinfo/python-list