Look up table

Find the X and Y value for a given character in table.
First line of input is the character to look for.
Rest of input is table. Output coords in form "x,y".
first char in table is coordinate 0,0

e.g. Input:
A
jkshyD
KJrHuE
gfSAlL
dUpqnm


Output:
3,2

IN

1
098
765
432
1ab

OUT

0,3

IN

&
(*-+
)%&^
[]{}

OUT

2,1

IN

X
QWERTY
UIOPAS
DFGHJK
LZXCVB
NM<>?#

OUT

2,3

IN

/
|V\^
v/Il
-!1_

OUT

1,1
Login to submit solution


17 symbols pyth
Mon Oct 24 13:29:41 2016 Sait2000
j\,,Khh#JxRz.zxJK
18 symbols pyth
Mon Sep 19 15:40:47 2016 Sait2000
pKhh#JxRz.zp\,pxJK
19 symbols pyth
Mon Sep 19 15:28:44 2016 Sait2000
JxRz.zpKhh#Jp\,pxJK
20 symbols pyth
Mon Sep 19 15:27:22 2016 Sait2000
JxRz.zKhh#JpKp\,pxJK
37 symbols perl
Tue Sep 23 20:41:48 2014 vakorol
#!/usr/bin/perl -ln
!$c?$c=$_:/$c/&&print"$-[0],",$.-2
39 symbols perl
Mon Jun 16 20:17:37 2014 dionys
#!/usr/bin/perl -ln
$s?/$s/&&print"$-[0],",$.-2:($s=$_)
39 symbols bash
Tue Aug 16 21:57:15 2016 hidefromkgb
sed '/0/c0,3
/%/c2,1
/#/c2,3
/!/c1,1
d'
44 symbols perl
Mon Jun 16 20:04:46 2014 dionys
#!/usr/bin/perl -ln
$.-1or$s=$_,next;/$s/&&print"$-[0],",$.-2
44 symbols bash
Wed Jul 27 06:05:42 2016 hidefromkgb
sed $'/0/c0,3\n/%/c2,1\n/#/c2,3\n/!/c1,1\nd'
47 symbols perl
Mon Jun 16 20:03:48 2014 dionys
#!/usr/bin/perl -ln
$.-1or$s=$_,next;/$s/ and print"$-[0],",$.-2
48 symbols perl
Mon Jun 16 10:11:31 2014 avkhozov
#!/usr/bin/perl -n
chop;$t=$_,next if!$t;/$t/&&print"$-[0],",$.-2
49 symbols perl
Mon Jun 16 01:00:50 2014 danieljabailey
#!/usr/bin/perl -n
chop;$t=$_,next if!$t;/$t/&&print$-[0],",",$.-2
50 symbols perl
Sun Jun 15 23:46:25 2014 avkhozov
#!/usr/bin/perl -n
chop;$t=$_,next if!$t;/$t/&&print $-[0],",",$.-2
53 symbols perl
Sat Jun 14 23:24:14 2014 avkhozov
#!/usr/bin/perl -n
chop;$t=$_,next if!$t;/$t/g&&print pos()-1,",",$.-2
59 symbols perl
Sat Jun 14 21:34:20 2014 danieljabailey
#!/usr/bin/perl -n
chop;$t=$_,next if!$t;print"$x,",$.-2if-1<($x=index$_,$t)
60 symbols perl
Sat Jun 14 21:32:09 2014 danieljabailey
#!/usr/bin/perl -n
chomp;$t=$_,next if!$t;print"$x,",$.-2if-1<($x=index$_,$t)
61 symbols ruby2.0
Sat Jul 5 14:10:05 2014 Nakilon
_=gets[0];print gets(p)[/\S*#{_}/m].index(_),?,,$`.count(?\n)
62 symbols perl
Sat Jun 14 21:30:34 2014 danieljabailey
#!/usr/bin/perl -n
chomp;$t=$_,next if!$t;print"$x,".($.-2)if-1<($x=index$_,$t)
64 symbols perl
Sat Jun 14 21:29:38 2014 danieljabailey
#!/usr/bin/perl -n
chomp;$t=$_,next if(!$t);print"$x,".($.-2)if-1<($x=index$_,$t)
65 symbols perl
Sat Jun 14 20:22:51 2014 avkhozov
#!/usr/bin/perl -n
chop;$c=$_ and next if$.<2;print"$x,",$.-2if($x=index$_,$c)!=-1

View all solutions