Hello, i am translating a program that I wrote in perl to python, i am currently stuck on this section and it does not work.

Perl:
Code:
[while (<MAYA>)
{
  
  my ($line) = $_;
  chomp($line);
     
  if ($line =~ /library_geometries/)
  {
    $start = 1;
  }
  
  if ($line =~ /<\/float_array>/)
  {
    $end = 1;
  }
  
  if (($start
...