pradam, you need to create a new type that aggregates a (presumably) integer and a string.
type Animal struct { Value int Name string } data := []Animal{{12,"cat"}, {42, "feline"}} hth, -s On Fri, Jan 26, 2018 at 6:38 PM, pradam <pradam.programm...@gmail.com> wrote: > Hi Gophers, > > I'm Newbie to Go, I have List of Tuple in python as you see below > > *data = [* > > > > > > > > > * (435347,'cat'), (435347,'feline'), (435347,'lion'), > (6765756,'dog'), (6765756,'hound'), (6765756,'puppy'), > (435347,'kitten'), (987977,'frog')]* > i have googled it but everywhere they have specified with same data-type > like > int_list := [4][2]int{{1, 0}, {2, 0}, {3, 0}, {4, 0}} > string_list := make([][]string, 0) > a := [1][2]string{{"lion","dog"}} > > So how can i convert data into go equivalent..? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.