HNHacker News
TopNewBestAskShowJobs

guruparan18

106 karma · joined December 14, 2010

Applied math graduate. Interested in math, computers and science in general.
submissionscomments
guruparan18··on Python Programming in your Browser: PythonAnywhere
This is certainly impressive to play around. However, what I would look forward for is a ssh connection from my laptop. With increasing connection there is a latency with what I typed and what appears in screen.

I noticed the below when I clicked on console. "Starting encrypted connection to consoles-1.pythonanywhere.com on port 443". So I tried the below command.

  $ ssh guru@consoles-1.pythonanywhere.com
  The authenticity of host 'consoles-1.pythonanywhere.com (23.21.200.247)' can't be established.
  RSA key fingerprint is d5:50:bd:8e:23:eb:14:3f:cf:15:87:42:0b:bf:e2:60.
  Are you sure you want to continue connecting (yes/no)? yes
  Warning: Permanently added 'consoles-1.pythonanywhere.com,23.21.200.247'   (RSA) to the list of known hosts.
  guru@consoles-1.pythonanywhere.com's password:

and failed with the password I used to create the profile. I tried the ssh command with port, but did not get prompt.

  $ ssh -p 443 guru@consoles-1.pythonanywhere.com
guruparan18··on Python: copying a list the right way
I knew white space means a lot in Python (Disc: newbee and learning Python still!). Just found this, and thought someone out there might be able to throw some more light.

  Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
  Type "copyright", "credits" or "license()" for more information.
  >>> a=[1,2,3]
  >>> b=a
  >>> b
  [1, 2, 3]
  >>> a=[1]
  >>> b
  [1, 2, 3]
  >>> id(a)
  18704984
  >>> id(b)
  18721728
  >>> c = [4, 5, 6]
  >>> d = c
  >>> id(c)
  10755928
  >>> id(d)
  10755928
  >>> print c, d
  [4, 5, 6] [4, 5, 6]
  >>> c = [7]
  >>> print c, d
  [7] [4, 5, 6]
  >>> e = c
  >>> c.append(8)
  >>> print c, d, e
  [7, 8] [4, 5, 6] [7, 8]
  >>>
← PreviousPage 3 of 3