Jump to content

What does Instruction[0] mean?

Yoo Song Won
Go to solution Solved by 79wjd,

Instruction[0] references the first character in the string 'Instruction' while Instruction[1:] references all characters except the first.

 

E.g.

Let instruction = 'hello'

Then instruction[0] == 'h' and instruction[1:] == 'ello'

Instruction[0] references the first character in the string 'Instruction' while Instruction[1:] references all characters except the first.

 

E.g.

Let instruction = 'hello'

Then instruction[0] == 'h' and instruction[1:] == 'ello'

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, 79wjd said:

Instruction[0] references the first character in the string 'Instruction' while Instruction[1:] references all characters except the first.

 

E.g.

Let instruction = 'hello'

Then instruction[0] == 'h' and instruction[1:] == 'ello'

Thank you!!!! Helps a lot!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×