On 04/05/2017 01:07 PM, Fazal Khan wrote:
> Hello,
>
> Heres another newbie python question: How can I loop through some data and
> assign different variables with each loop
>
> So this is my original code:
>
> def BeamInfo(x):
> for Bnum in x:
> if
On Wed, Apr 05, 2017 at 12:07:05PM -0700, Fazal Khan wrote:
> Hello,
>
> Heres another newbie python question: How can I loop through some data and
> assign different variables with each loop
You don't. That's a bad idea.
Instead, you use a sequence (a tuple, or a list), and use an index:
On 05/04/17 20:07, Fazal Khan wrote:
> assign different variables with each loop
You can't, but you can fake it...
> def BeamInfo(x):
> for Bnum in x:
> if plan1.IonBeamSequence[Bnum].ScanMode == 'MODULATED':
> TxTableAngle =
>
Hello,
Heres another newbie python question: How can I loop through some data and
assign different variables with each loop
So this is my original code:
def BeamInfo(x):
for Bnum in x:
if plan1.IonBeamSequence[Bnum].ScanMode == 'MODULATED':
TxTableAngle =