Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

List in Pyton

Status
Not open for further replies.

TSI06

Mechanical
Joined
Mar 16, 2011
Messages
2
Location
FR
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












 
You nede to indent the i=i+1. Python uses indentation to determine what lines are in a loop.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top