×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

List in Pyton

List in Pyton

List in Pyton

(OP)
Hi Everybody,

I want to make a List in Pyton script, for make few datum plans in abaqus.

I tried to make this lop:

i=0
Mylist= {}

while 0<= i <=10:
 Mylist['i']=i
 i=i+1

This loop is not good.

I would like to use the methods update, but i don't know what is the syntax for add a new number in a list.

For a Loop more simple

i=0
while 0<= i <=10:
 i=i+1

Abaqus send me a strange Warning message :
Indentation error: ('expected an indented block',(C:/Temp/Copie de Copie de ISOthin3phase14.py', 167, 1, 'i=i+1\n'))

I don't understand what is the problem

Thank you
 











 

RE: List in Pyton

You nede to indent the i=i+1. Python uses indentation to determine what lines are in a loop.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources