Optional assignments ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Madhusudan Singh

    #1

    Optional assignments ?

    Hi

    Is it possible to have something like :

    a,b,c,d=fn(that returns 10 return values) ?

  • Robert Kern

    #2
    Re: Optional assignments ?

    Madhusudan Singh wrote:[color=blue]
    > Hi
    >
    > Is it possible to have something like :
    >
    > a,b,c,d=fn(that returns 10 return values) ?[/color]

    a,b,c,d = fn()[:4]

    --
    Robert Kern
    rkern@ucsd.edu

    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter

    Comment

    • Madhusudan Singh

      #3
      Re: Optional assignments ?

      Robert Kern wrote:
      [color=blue]
      > Madhusudan Singh wrote:[color=green]
      >> Hi
      >>
      >> Is it possible to have something like :
      >>
      >> a,b,c,d=fn(that returns 10 return values) ?[/color]
      >
      > a,b,c,d = fn()[:4]
      >[/color]
      Thanks !

      Comment

      Working...