镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

invalid syntax for loop in python  #33668

Description

@annarhnna

for i in len ([0,:,:]): #want the length of a list, use len #len() function returns the number of items of an object
t = variables[time][i,:,:]
listtime.append[t]
print(list(range(t)))

SyntaxError: invalid syntax

Activity

  1. mscdex commented on May 31, 2020

    @mscdex
    Contributor

    What does this have to do with node? Are you seeing this code in an existing python script in the node repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions